package com.parking.common.core.paracheck;

import com.parking.common.core.paracheck.checker.JpgOrPngChecker;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 自定义注释 字符串图片格式检测
 * */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {JpgOrPngChecker.class})
public @interface JpgOrPng {
    /**
     * 默认信息
     * */
    String message() default "图片为jpg或png格式";

    /**
     * 默认格式(暂不清楚)
     * */
    Class<?>[] groups() default {};

    /**
     * 默认格式(暂不清楚)
     * */
    Class<? extends Payload>[] payload() default {};
}
